{% extends "blog/base.html" %}
{% load staticfiles %}
{% load custom_markdown %}

{% block content %}
<script type="text/javascript" charset="utf-8" src="{% static 'blog/js/markdownJs.js' %}"></script>
{% for contacts in contactsList %}
<div class="blog-post">
	<h3 class="blog-post-title">
		<a href="{{ contacts.get_absolute_url }}"> {{ contacts.title }}</a>
	</h3>
	<p class="blog-post-meta">
		作者: <a class="post-author" href="#">{{ contacts.author|safe}}</a> 
		标签: <a class="post-category post-category-js" href="#">{{ contacts.category }}</a> 
		时间: <a class="post-author" href="#">{{ contacts.dateTime|date:"Y/m/d"}}</a> 
	</p>

        {{ contacts.content | custom_markdown}}
    </div>
<script>
homemd();
</script>
<!-- /.blog-post -->
{% endfor %}

{% endblock content %}

<!-- 列出相关文章 -->
{% block articles %}
<button type="button" class="btn btn-info" data-toggle="collapse"
	data-target="#allArticles">全部文章</button>

<div id="allArticles" class="collapse">
	{% for post in postList %} <a href="{{ post.get_absolute_url }}">{{post.title}}</a><br />
	{% endfor %}
</div>
{% endblock articles %}

<!-- 分页 -->
{% block pagers %} {% if contactsList.has_previous %}

<li><a href="?page={{ contactsList.previous_page_number }}">前一页</a></li>
{% endif %} 第 {{ contactsList.number }}页 总页数为 {{ contactsList.paginator.num_pages }}. {% if contactsList.has_next %}
<li><a href="?page={{ contactsList.next_page_number }}">后一页</a></li>

{% endif %} {% endblock pagers %}


